<template>
  <div>
    <!-- 面包屑导航 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/operationsummary/Operations' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>工作台</el-breadcrumb-item>
    </el-breadcrumb>
    <br />
    <br />
    <!-- 页面上方的分标签页 -->
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="病例" name="first">
        <AddCase @callFather="toSecond"/>
      </el-tab-pane>
      <el-tab-pane label="处方" name="second">
        <Prescription/>
      </el-tab-pane>
      
    </el-tabs>
  </div>
</template>


<script>
// 导入组件
import Prescription from "./Prescription.vue";
import AddCase from "./AddCase.vue";


export default {
  // 导入的组件写到这里
    components:{
        Prescription,
        AddCase
    },

  data() {
    return {
      // 默认选中的组件
      activeName: "first",
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    toSecond(param){
      this.activeName=param;
    }
  },
};
</script>
<style scoped>


</style>